﻿CREATE TABLE [dbo].[t_APR] (
    [LoanID]           INT           NOT NULL,
    [PaymentsPerYear]  TINYINT       NOT NULL,
    [InterestBaseDays] SMALLINT      NOT NULL,
    [StandardPeriod]   AS            ([InterestBaseDays]/[PaymentsPerYear]),
    [AddOnRate]        TINYINT       NULL,
    [AmountFinanced]   MONEY         NULL,
    [Term]             SMALLINT      NULL,
    [OpenDate]         SMALLDATETIME NULL,
    [FirstDueDate]     SMALLDATETIME NULL,
    [OriginalTermDays] AS            ((([Term]-(1))*(30.43)+datediff(day,[OpenDate],[FirstDueDate]))+(1))
);

